package com.wolfking.converter.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.util.Date;

@Data
@TableName("sql_data_source")
public class SqlDataSource {

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @TableField
    private String name;
    @TableField
    private String username;
    @TableField
    private String password;
    @TableField
    private String url;
    @TableField("driver_class_name")
    private String driverClassName;
    @TableField("initial_size")
    private int initialSize;
    @TableField("max_active")
    private int maxActive;
    @TableField("min_idle")
    private int minIdle;
    @TableField("max_idle")
    private int maxIdle;
    @TableField("max_wait")
    private long maxWait;
    @TableField("keep_alive")
    private Boolean keepAlive;
    @TableField("test_while_idle")
    private Boolean testWhileIdle;
    @TableField("validation_query")
    private String validationQuery;
    @TableField("test_on_borrow")
    private Boolean testOnBorrow;
    @TableField("test_on_return")
    private Boolean testOnReturn;
    @TableField("pool_prepared_statements")
    private Boolean poolPreparedStatements;

    @TableField("is_able")
    private Boolean isAble;
    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;
    /**
     * 修改时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 版本号
     */
    @Version
    @TableField(value = "version", fill = FieldFill.INSERT)
    private Integer version;

}
